package com.jic.market.api.manage;

import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.request.*;
import com.jic.market.response.PatchGroupProductResponse;
import com.jic.market.response.PatchGroupProductV2Response;
import com.jic.market.response.PromotionProductResponse;
import com.jic.market.response.ReloadMutexProductResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * 拼团商品
 *
 * @author guohuayong
 * @date 2020/2/24 17:29
 **/
public interface PatchGrouponProductManageApi {

    /**
     * 批量保存商品
     * @param listRequest
     * @return
     */
    RestResult<Integer> saveBatch(PatchGroupProductSaveListRequest listRequest);

    /**
     * 批量保存商品V2
     * @param listRequest
     * @return
     */
    RestResult<Integer> saveBatchV2(PatchGroupProductSaveV2ListRequest listRequest);

    /**
     * 添加所有商品
     * @param addAllProductRequest
     * @returna
     */
    RestResult<Integer> addAllProduct(PatchGroupProductAddAllProductRequest addAllProductRequest);

    /**
     * 保存商品
     * @param request
     * @return
     */
    RestResult<Integer> save(PatchGouponProductRequest request);

    /**
     * 更新
     * @param pgpr
     * @return
     */
    RestResult<Integer> update(PatchGouponProductRequest pgpr);

    /**
     * 更新促销商品限制项
     * @param request
     * @return
     */
    RestResult<Integer> updateStockLimit(PatchGrouponUpdateStockLimitRequest request);

    /**
     * 查询当前促销商品
     *
     * @param ppqlRequest
     * @return 分页促销商品
     */
    RestResult<PageResult<PatchGroupProductResponse>> getPromotionProductList(
            PromotionProductQueryListRequest ppqlRequest);


    /**
     * 查询当前促销商品V2
     *
     * @param ppqlRequest
     * @return 分页促销商品
     */
    RestResult<PageResult<PatchGroupProductV2Response>> getPromotionProductListV2(
            PatchGroupPromotionProductQueryListV2Request ppqlRequest);


    /**
     * 批量撤销
     * @param request
     * @return 分页促销商品
     */
    RestResult deleteProductBatch(DeletePatchGrouponProductBatchRequest request);

    /**
     * 批量删除商品
     * @param request
     * @return 分页促销商品
     */
    RestResult deleteProductBatchV2(DeletePatchGrouponProductBatchV2Request request);

    /**
     * 删除商品
     * @param request
     * @return
     */
    RestResult deleteProduct(PatchGouponProductRequest request) ;

    /**
     * 删除商品V2
     * @param request
     * @return
     */
    RestResult deleteProductV2(@RequestBody PatchGouponProductDeleteV2Request request) ;

    /**
     * 导入数据
     * @param file
     * @return
     */
    RestResult<String> importExcel(MultipartFile file, Long promotionId);
}
